package com.kldy8.kldyw.find;

import android.content.Context;
import android.util.AttributeSet;
import android.webkit.WebSettings;
import android.webkit.WebView;

/**
 * Created by Qun Chen on 2016/11/1 0001.
 * 自定义的webView
 */
public class CustomWebView extends WebView {

    public CustomWebView(Context context) {
        super(context);
        initView(context);
    }

    public CustomWebView(Context context, AttributeSet attrs) {
        super(context, attrs);
        initView(context);
    }

    public CustomWebView(Context context, AttributeSet attrs, int defStyleAttr) {
        super(context, attrs, defStyleAttr);
        initView(context);
    }

    private void initView(Context context) {
        this.getSettings().setJavaScriptEnabled(true);
//        this.setHorizontalScrollBarEnabled(false);
//        this.setInitialScale(70);
        this.getSettings().setCacheMode(WebSettings.LOAD_CACHE_ELSE_NETWORK);
    }

}
